package com.gopay.common.domain.ptbank;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Entity: 机构托管费配置
 */
@Entity
@Table(name = "GSRT_BANK_HF_ORG_RATE_MASTER")
public class GsrtBankHfOrgRateMaster implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	private Long id;

	/** 
	 * 乐观锁版本号
	 */
	private Long version;

	/** 
	 * 商户Id
	 */
	private String mercustid;

	/** 
	 * 机构号
	 */
	private String orgcode;

	/** 
	 * 费率编号
	 */
	private String rateid;

	/** 
	 * 生效时间
	 */
	private String begindate;

	/** 
	 * 结束时间
	 */
	private String enddate;

	/** 
	 * 创建时间
	 */
	private Date createdTs;

	/** 
	 * 记录最后修改时间
	 */
	private Date lastUpdTs;

	private String remark;

	private String remark2;

	private String remark3;

	public GsrtBankHfOrgRateMaster() {
	}

	public GsrtBankHfOrgRateMaster(Long id, Long version, String mercustid, String orgcode, String rateid,
								   String begindate, String enddate, Date createdTs, Date lastUpdTs, String remark,
								   String remark2, String remark3) {
		this.id = id;
		this.version = version;
		this.mercustid = mercustid;
		this.orgcode = orgcode;
		this.rateid = rateid;
		this.begindate = begindate;
		this.enddate = enddate;
		this.createdTs = createdTs;
		this.lastUpdTs = lastUpdTs;
		this.remark = remark;
		this.remark2 = remark2;
		this.remark3 = remark3;
	}

	@Id
	@SequenceGenerator(name = "GsrtBankHfOrgRateMasterSequence", sequenceName = "GSRT_BANK_HO_RATE_MASTER_SEQ")
	@GeneratedValue(generator = "GsrtBankHfOrgRateMasterSequence", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "VERSION", precision = 22, scale = 0)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@Column(name = "MERCUSTID", length = 10)
	public String getMercustid() {
		return this.mercustid;
	}

	public void setMercustid(String mercustid) {
		this.mercustid = mercustid;
	}

	@Column(name = "ORGCODE", nullable = false, length = 20)
	public String getOrgcode() {
		return this.orgcode;
	}

	public void setOrgcode(String orgcode) {
		this.orgcode = orgcode;
	}

	@Column(name = "RATEID", nullable = false, length = 32)
	public String getRateid() {
		return this.rateid;
	}

	public void setRateid(String rateid) {
		this.rateid = rateid;
	}

	@Column(name = "BEGINDATE", nullable = false, length = 8)
	public String getBegindate() {
		return this.begindate;
	}

	public void setBegindate(String begindate) {
		this.begindate = begindate;
	}

	@Column(name = "ENDDATE", nullable = false, length = 8)
	public String getEnddate() {
		return this.enddate;
	}

	public void setEnddate(String enddate) {
		this.enddate = enddate;
	}

	@Column(name = "CREATED_TS", nullable = false)
	public Date getCreatedTs() {
		return this.createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name = "LAST_UPD_TS", nullable = false)
	public Date getLastUpdTs() {
		return this.lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "REMARK", length = 50)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "REMARK2", length = 50)
	public String getRemark2() {
		return this.remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Column(name = "REMARK3", length = 50)
	public String getRemark3() {
		return this.remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}
}
